package com.weather.data.result;

/**
 * @author HanYiMing
 * @date 2022/5/30
 * @description 统一状态码
 */

public enum ResponseType {
    /**
     * SUCCESS:成功
     * FAIL:失败
     */
    SUCCESS(200, "成功"),
    FAIL(500, "失败"),
    ACCOUNT_UNKNOWN(2002, "账号不存在"),
    ACCOUNT_ERROR(2003, "账号或密码错误"),
    TOKEN_EXPIRE(401, "token过期"),
    WARNING(2005, "警告"),
    NOT_LOGIN(401, "未登录"),
    PERMISSION_DENIED(2006, "权限不足"),
    ACCOUNT_EXIST(2004, "账号已存在"),
    PASSWORD_THE_SAME(2007,"新密码不能与旧密码一致!"),
    RENAME(5002,"存在重名!");

    /**
     * 响应码
     */
    Integer code;
    /**
     * 响应信息
     */
    String mes;

    private ResponseType(Integer code, String mes) {
        // TODO Auto-generated constructor stub
        this.code = code;
        this.mes = mes;
    }

    public Integer getCode() {
        return code;
    }

    public String getMes() {
        return mes;
    }


}

